<template>
	<view class="mine">
		<view class="head">
			<view class="head-main">
				<view class="user-icon">
					<image src="http://pic.yupoo.com/isfy666/d2834612/44d41bd8.png" mode="widthFix"></image>
					<!-- <image class="tx-img" :src="yonghuwx.avatarUrl"></image> -->
					
				</view>
				<view class="user-name">㤫原创</view>
				<!-- <view class="name">{{yonghuwx.nickName}} </view> -->
			</view>
		</view>
		<view class="body">
			<view class="box-one">
				<view class="box-one-top" @click="toOrder('1')">
					<view class="order-tips">我的订单</view>
					<view class="order-btn">查看全部订单
						<uni-icons class="icon-arrowright" type="arrowright" size="15" color="#98999b"></uni-icons>
					</view>
				</view>
				<view class="box-one-bottom">
					<view class="box-one-item" @click="toOrder('2')">
						<view class="iconfont icon-daifukuan"></view>
						<text>待付款</text>
					</view>
					<view class="box-one-item" @click="toOrder('3')">
						<view class="iconfont icon-daifahuo"></view>
						<text>待发货</text>
					</view>
					<view class="box-one-item" @click="toOrder('4')">
						<view class="iconfont icon-daishouhuo"></view>
						<text>待收货</text>
					</view>
					<view class="box-one-item" @click="toOrder('5')">
						<view class="iconfont icon-pingjia"></view>
						<text>评价</text>
					</view>
					<navigator url="/pages/aftersale/aftersale">
						<view class="box-one-item">
							<view class="iconfont icon-xiaoshoutuihuo"></view>
							<text>退款/售后</text>
						</view>
					</navigator>
				</view>
			</view>
			<view class="box-two">
				<!-- <navigator url="/pages/shopcat/shopcat"> -->
					<view class="box-two-item" @click="toShopCar">
						<view class="box-two-left">
							<view class="iconfont icon-gouwuche"></view>
							购物车
						</view>
						<uni-icons class="icon-arrowright" type="arrowright" size="15" color="#98999b"></uni-icons>
					</view>
				<!-- </navigator> -->
				<navigator url="/pages/shipping/shipping">
					<view class="box-two-item">

						<view class="box-two-left">
							<view class="iconfont icon-weibiaoti2fuzhi08"></view>
							收货地址
						</view>
						<uni-icons class="icon-arrowright" type="arrowright" size="15" color="#98999b"></uni-icons>
					</view>
				</navigator>
				<navigator>
					<view class="box-two-item">

						<view class="box-two-left">
							<view class="iconfont icon-geren"></view>
							个人信息
						</view>
						<uni-icons class="icon-arrowright" type="arrowright" size="15" color="#98999b"></uni-icons>
					</view>
				</navigator>
				<navigator  url="/pages/personage/personage">
					<view class="box-two-item">

						<view class="box-two-left">
							<view class="iconfont icon-Account-Settings"></view>
							账号设置
						</view>
						<uni-icons class="icon-arrowright" type="arrowright" size="15" color="#98999b"></uni-icons>
					</view>
				</navigator>
			</view>
		</view>
		<!-- <abc/> -->
		<view class="footer"></view>
	</view>
</template>
<script>
	// import abc from "../personage/personage";
	export default {
		data() {
			return {
				yonghuwx: []
			};
		},
		// onLoad() {
		// 	let that = this;
		// 	uni.login({
		// 		provider: 'weixin',
		// 		success: function(loginRes) {
		// 			// 获取用户信息				
		// 			uni.getUserInfo({
		// 				provider: 'weixin',
		// 				success: function(infoRes) {
		// 					that.yonghuwx = infoRes.userInfo
		// 					console.log(that.yonghuwx)
		// 				}
		// 			});
		// 		}
		// 	});
		// },
		methods: {
			// 订单
			toOrder(num) {
				if (uni.getStorageSync('token')) {
					uni.navigateTo({
						url: '/pages/order/order?num=' + num,
					});
				} else {
					uni.navigateTo({
						url: "/pages/login/login",
					});
				}
			},
			//购物车
			toShopCar(){
				if (uni.getStorageSync('token')) {
					uni.navigateTo({
						url: '/pages/shopcat/shopcat',
					});
				} else {
					uni.navigateTo({
						url: "/pages/login/login",
					});
				}
			}
		},
		components: {
			// abc
		}
	};
</script>
<style lang="scss" scoped>
	@import '../../static/css/icon-font.wxss';

	.mine {
		height: calc(100vh - 300rpx);
	}

	.body {
		height: 100%;
		padding: 20rpx;
		background-color: #f8f8f8;

		.box-one {
			width: 710rpx;
			background-color: #fff;
			padding-left: 20rpx;
			border-radius: 20rpx;

			.box-one-top {
				width: 690rpx;
				height: 90rpx;
				display: flex;
				flex-flow: row nowrap;
				justify-content: space-between;
				align-items: center;
				border-bottom: 1px solid #f8f8f8;

				.order-tips {
					font-size: 14px;
					font-weight: bold;
				}

				.order-btn {
					color: #98999b;
					font-size: 12px;

					.icon-arrowright {
						padding: 0 15rpx;
					}
				}
			}

			.box-one-bottom {
				padding: 20rpx 0 20rpx;
				display: flex;
				flex-flow: row nowrap;
				justify-content: space-around;
				align-items: center;

				navigator {
					padding: 20rpx 0;
					flex: 1;
				}

				.box-one-item {
					display: flex;
					flex-flow: column nowrap;
					align-items: center;
					justify-content: center;
					flex: 1;
					font-size: 12px;

					.iconfont {
						text-align: center;
						font-size: 24px;
						width: 60rpx;
						height: 60rpx;
					}
				}
			}
		}

		.box-two {
			margin-top: 20rpx;
			// padding-left: 20rpx;
			border-radius: 20rpx;
			background-color: #fff;
			border-radius: 20rpx;

			navigator {
				width: 100%;
				padding-left: 20rpx;
			}

			.box-two-item {
				width: 690rpx;
				height: 90rpx;
				border-bottom: 1px solid #f8f8f8;
				display: flex;
				flex-flow: row nowrap;
				justify-content: space-between;
				align-items: center;

				.box-two-left {
					font-size: 12px;
					display: flex;
					flex-flow: row nowrap;

					.iconfont {
						font-size: 18px;
						margin-right: 20rpx;
					}
				}

				.icon-arrowright {
					padding: 0 20rpx;
				}
			}

			navigator:last-child .box-two-item {
				border: none;
			}
		}
	}

	.head {
		width: 100%;
		height: 300rpx;
		padding: 20rpx;
		display: flex;
		align-items: center;
		background-image: url(http://pic.yupoo.com/isfy666/6f274cbc/a1d8ee9c.jpg);
		background-size: cover;
		background-repeat: no-repeat;

		.head-main {
			height: 150rpx;
			display: flex;
			flex-flow: row nowrap;

			.user-icon {
				width: 150rpx;
				height: 100%;
				border-radius: 75rpx;
				overflow: hidden;

				image {
					width: 100%;
				}
			}

			.user-name {
				font-size: 18px;
				font-weight: bold;
				padding-left: 40rpx;
				line-height: 150rpx;
			}
		}
	}
</style>
